﻿<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="SelectCompany.aspx.vb" Inherits="MyWorkflow.SelectCompany" %>
<%@ Register TagPrefix="cnt" Namespace="Mysoft.Map.Application.Controls" Assembly="Mysoft.Map.Application.Components" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
	<HEAD>
		<title>选择公司</title>
		<meta name="GENERATOR" content="Microsoft Visual Studio .NET 7.1">
		<meta name="CODE_LANGUAGE" content="Visual Basic .NET 7.1">
		<meta name="vs_defaultClientScript" content="JavaScript">
		<meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">
		<script language="javascript" src="/_controls/settings.aspx"></script>
		<link rel="stylesheet" type="text/css" href="/_common/styles/dialogs.css">
		<link rel="stylesheet" type="text/css" href="/_common/styles/global.css">	
		<link rel="stylesheet" type="text/css" href="/_nav/taskbox.css">
		<link rel="stylesheet" type="text/css" href="/_controls/tree/tree.css">
		<script language="javascript" src="/_common/scripts/global.js"></script>
		<script language="javascript" src="/_controls/util/util.js"></script>
		<script language="javascript" src="/_forms/FormBase.js"></script>
		<script language="javascript" src="/_controls/lookup/map_lookup.js"></script>
		<script language="javascript" src="/_controls/lookup/map_LookupDialogs.js"></script>
		<script language="javascript">
			// 确定返回
			// 返回用户信息字符串：用户GUID;用户名称
			function okClick()
			{
				var ls = new LookupItems();
				var li = new LookupItem();
				li.id = Table1.value;
				li.name = "";
				li.html = "<img src='/_imgs/ico_16_10.gif' class='lui'>" + Table1.text;
				li.value = Table1.text;
				li.values = null;
				li.keyValues = null;
				ls.items.push(li);
				
				window.returnValue = ls;
				window.close();
			}
			
			// 处理双击节点的事件
			function dblClick(o)
			{
				if (o.allowselect == "1")
					okClick();
			}

			// 返回空值
			function returnNull()
			{
				var ls = new LookupItems();
				window.returnValue = ls;
				window.close();
			}
						
		</script>
	</HEAD>
	<body MS_POSITIONING="GridLayout">
		<form id="mapForm" method="post" runat="server">
			<table width="100%" cellspacing="0" cellpadding="0" height="100%">
				<tr>
					<td colspan="2" class="main">
						<table width="100%" cellspacing="0" cellpadding="0" height="100%">
							<colgroup>
								<col>
								<col width="45">
							</colgroup>
							<TBODY>
								<tr height="1">
									<td><b style="COLOR:#666666">选择单位:</b></td>
									<td></td>
								</tr>
								<tr height="10">
									<td colspan="2">
									</td>
								</tr>
								<tr>
									<td colspan="2" class="wizBox1">
										<DIV style="PADDING-RIGHT: 5px; PADDING-LEFT: 5px; PADDING-BOTTOM: 5px; OVERFLOW: auto; WIDTH: 100%; PADDING-TOP: 5px; HEIGHT: 100%">
											<cnt:repeater id="repLD" runat="server" SortSignDESC='<img src="/_imgs/ico_arrow_d.gif">' SortSignASC='<img src="/_imgs/ico_arrow_u.gif">'
												PKField="BldCode" LinkAlign="right" LinkCssClass="a1" FooterCssClass="footer" EnablePager="false">
												<HeaderTemplate>
													<TABLE id="Table1" cellspacing="0" cellpadding="0" width="100%" class="singleSelectTree" defaultShowLevel="4">
												</HeaderTemplate>
												<ItemTemplate>
													<tr height='20' code='<%# DataBinder.Eval(Container, "DataItem.Code") %>'
														 value='<%# DataBinder.Eval(Container, "DataItem.GUID") %>'
														 text='<%# DataBinder.Eval(Container, "DataItem.Name") %>'
														 allowselect='<%# DataBinder.Eval(Container, "DataItem.AllowSelect") %>'
														 is_hide="false" onclick="Table1.clickNode(this)" ondblclick="dblClick(this)"
														 onmouseover='this.bgColor="#E3E9F4"' onmouseout='this.bgColor="#ffffff"'>
														<td>
															<span></span><label style="CURSOR: hand"></label>
															<img src='/_imgs/ico_16_10.gif'>
															<%# DataBinder.Eval(Container, "DataItem.name") %>
														</td>
													</tr>
												</ItemTemplate>
												<FooterTemplate>
						</table>
						</FooterTemplate> </cnt:repeater></DIV>
					</td>
				</tr>
			</table>
			</TD></TR>
			<tr height="40">
				<td class="buttons" style="TEXT-ALIGN:left">
					<asp:Literal id="Literal1" runat="server"></asp:Literal>
				</td>
				<td class="buttons">
					<button style="WIDTH:70px" onclick="okClick()" id="btnOk" type="button">确 定</button>&nbsp;&nbsp;
					<button style="WIDTH:70px" onclick="parent.window.close();" type="button">取 消</button>
				</td>
			</tr>
			</TBODY></TABLE>
		</form>
	</body>
</HTML>
